Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Inter-process context propagation requirements #241

Closed

Conversation

deejgregor
Copy link

@mmanciop
Copy link

mmanciop commented Feb 5, 2024

I'd love to have this supported in OpenTelemetry SDKs. I think I implemented something like that manually in the last couple years at least 5 times across various customers and various tools. (Classic use case: trace context propagation for K8S cronjobs/jobs and job scheduling on ECS, rather than using AWS Batch.)

I think we should have a mechanism to specify in the env var whether the instrumentations would continue the trace, or start a new trace and create a span link to the trace context in the env var.

As an addition, I think a very useful behaviour would be for the SDK to have an instrumentation that is activated by this env var, and creates a span describing the process's startup. This, in my experience, is usually the desired behaviour for instrumenting entry points of batch jobs, and this "entry span" tends to be very tedious to create with manual instrumentation and tends not to have interesting metadata (exceptions are manual instrumentations that report the Job ID, but I came across very few such examples over the years in customer codebases). The "startup span" comes with a challenge: when to close it. In the past I used a mix of listeners for process shutdown + flush (e.g., JVM Shutdown Hooks or Python's atexit), which overall has a greater risk of losing spans over the process shutdown than closing the span early (and flushing?), but has a more intuitive semantic for the end user (and the additional benefit of "measuring" the lifetime of the batch job via span duration).

@adrielp
Copy link
Contributor

adrielp commented Sep 24, 2024

This can be closed in favor of #258

@trask trask closed this Sep 26, 2024
lmolkova added a commit that referenced this pull request Oct 22, 2024
…ion (#258)

Based on conversations last week in the Specification and Semantic
Conventions SIGs, I'm opening this duplicate pull request which was
originally set as a
[Draft](https://github.com/open-telemetry/oteps/pull/241/files) and
hasn't had movement since last November.

There are real use cases that are coming to fruiting, namely in the
CI/CD working group, that will benefit from this being accepted. Once
accepted we can work on getting the specification added for both general
context propagation and baggage.

On the note of baggage; baggage is a form of context propagation and was
not originally mentioned directly by name in this OTEP. It is however,
absolutely essential. I've had the pleasure of prototyping out tracing
within an OpenTofu controller system where context on available in
parent/child at the very start of the trace was available. Baggage was
the means of transferring this critical context to subsequent siblings
that would've not had it otherwise.

Thanks for all the hard work to the original author (@deejgregor) and
opening the draft #241

CC. TC sponsors @jsuereth @carlosalberto

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
carlosalberto pushed a commit to carlosalberto/oteps that referenced this pull request Oct 23, 2024
…ion (open-telemetry#258)

Based on conversations last week in the Specification and Semantic
Conventions SIGs, I'm opening this duplicate pull request which was
originally set as a
[Draft](https://github.com/open-telemetry/oteps/pull/241/files) and
hasn't had movement since last November.

There are real use cases that are coming to fruiting, namely in the
CI/CD working group, that will benefit from this being accepted. Once
accepted we can work on getting the specification added for both general
context propagation and baggage.

On the note of baggage; baggage is a form of context propagation and was
not originally mentioned directly by name in this OTEP. It is however,
absolutely essential. I've had the pleasure of prototyping out tracing
within an OpenTofu controller system where context on available in
parent/child at the very start of the trace was available. Baggage was
the means of transferring this critical context to subsequent siblings
that would've not had it otherwise.

Thanks for all the hard work to the original author (@deejgregor) and
opening the draft open-telemetry#241

CC. TC sponsors @jsuereth @carlosalberto

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
carlosalberto pushed a commit to carlosalberto/oteps that referenced this pull request Oct 30, 2024
…ion (open-telemetry#258)

Based on conversations last week in the Specification and Semantic
Conventions SIGs, I'm opening this duplicate pull request which was
originally set as a
[Draft](https://github.com/open-telemetry/oteps/pull/241/files) and
hasn't had movement since last November.

There are real use cases that are coming to fruiting, namely in the
CI/CD working group, that will benefit from this being accepted. Once
accepted we can work on getting the specification added for both general
context propagation and baggage.

On the note of baggage; baggage is a form of context propagation and was
not originally mentioned directly by name in this OTEP. It is however,
absolutely essential. I've had the pleasure of prototyping out tracing
within an OpenTofu controller system where context on available in
parent/child at the very start of the trace was available. Baggage was
the means of transferring this critical context to subsequent siblings
that would've not had it otherwise.

Thanks for all the hard work to the original author (@deejgregor) and
opening the draft open-telemetry#241

CC. TC sponsors @jsuereth @carlosalberto

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
carlosalberto pushed a commit to carlosalberto/oteps that referenced this pull request Oct 31, 2024
…ion (open-telemetry#258)

Based on conversations last week in the Specification and Semantic
Conventions SIGs, I'm opening this duplicate pull request which was
originally set as a
[Draft](https://github.com/open-telemetry/oteps/pull/241/files) and
hasn't had movement since last November.

There are real use cases that are coming to fruiting, namely in the
CI/CD working group, that will benefit from this being accepted. Once
accepted we can work on getting the specification added for both general
context propagation and baggage.

On the note of baggage; baggage is a form of context propagation and was
not originally mentioned directly by name in this OTEP. It is however,
absolutely essential. I've had the pleasure of prototyping out tracing
within an OpenTofu controller system where context on available in
parent/child at the very start of the trace was available. Baggage was
the means of transferring this critical context to subsequent siblings
that would've not had it otherwise.

Thanks for all the hard work to the original author (@deejgregor) and
opening the draft open-telemetry#241

CC. TC sponsors @jsuereth @carlosalberto

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
carlosalberto pushed a commit to carlosalberto/oteps that referenced this pull request Nov 1, 2024
…ion (open-telemetry#258)

Based on conversations last week in the Specification and Semantic
Conventions SIGs, I'm opening this duplicate pull request which was
originally set as a
[Draft](https://github.com/open-telemetry/oteps/pull/241/files) and
hasn't had movement since last November.

There are real use cases that are coming to fruiting, namely in the
CI/CD working group, that will benefit from this being accepted. Once
accepted we can work on getting the specification added for both general
context propagation and baggage.

On the note of baggage; baggage is a form of context propagation and was
not originally mentioned directly by name in this OTEP. It is however,
absolutely essential. I've had the pleasure of prototyping out tracing
within an OpenTofu controller system where context on available in
parent/child at the very start of the trace was available. Baggage was
the means of transferring this critical context to subsequent siblings
that would've not had it otherwise.

Thanks for all the hard work to the original author (@deejgregor) and
opening the draft open-telemetry#241

CC. TC sponsors @jsuereth @carlosalberto

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants